<?
//付款超时取消订单

$time = cmf_get_option('goods')['timeoutSetStatus4'];
if ($time) {
    $time = $this->time - $time * 60;
    $where = [
        ['status', '=', 0],
        ['create_time', '<', $time]
    ];
    $lists = db('goods_order')->field('id')->where($where)->select()->toArray();
    $ids = array_column($lists, 'id');
    $orderModel = new \Aaa\goods\model\OrderModel;
    $orderModel->id($ids)->setStatus4('cron', '付款超时取消订单');
}